<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php echo $this->pageTitle; ?></title>
	<link rel="stylesheet" type="text/css" href="<?php echo WWW_URL ?>css/bootstrap.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo WWW_URL ?>css/style.css" />
    </head>

    <body>
	<?php /* ------------------Modal ------------------- */ ?>
	<?php
	echo $this->renderPartial('//layouts/modals/flirt');
	?>
	<?php /* -------------varible for input hidden --------- */ ?>
	<?php echo $this->renderPartial('//layouts/input_hidden') ?>
	<div class="main">
	    <div class="header">
		<div class="container">
		    <div class="logo"><a href="<?php echo SITE_NAME_URL ?>"><img src="<?php echo WWW_URL ?>images/logo.png" alt="" /></a></div>
		    <ul class="menu-account">
			<li><a href="<?php echo url('user/dashboard') ?>" <?php if (Yii::app()->controller->action->id == 'dashboard') echo 'class="active"'; ?>>Home</a></li>
			<li><a href="<?php
			    if (time() > user()->getModel()->expired_time_msg) {
				echo url('paypal');
			    } else {
				echo url('mailbox/message/inbox');
			    }
			    ?>" <?php if (isset(Yii::app()->controller->module->id) && Yii::app()->controller->module->id == 'mailbox') echo 'class="active"'; ?>>Inbox</a></li>
			<li><a href="<?php echo url('user/search') ?>" <?php if (Yii::app()->controller->action->id == "search") echo 'class="active"'; ?>>Search</a></li>
			<li><a href='<?php echo url('user/interested') ?>' <?php if (Yii::app()->controller->action->id == "interested") echo 'class="active"'; ?>>I'm Interested</a></li>
		    </ul>

		    <?php if (!user()->isGuest) { ?>
    		    <div class="right-hea">

    			<ul class="nav nav-pills">

    			    <li class="dropdown">
    				<a href="#" data-toggle="dropdown" role="button" id="drop5" class="dropdown-toggle">Welcome <?php echo user()->getModel()->username; ?><b class="caret"></b></a>
    				<ul aria-labelledby="drop5" role="menu" class="dropdown-menu" id="menu2">
    				    <li role="presentation"><a href="<?php echo url('my_profile') ?>" tabindex="-1" role="menuitem">My Profile</a></li>				    
    				    <li role="presentation"><a href="<?php echo url('my_account') ?>" tabindex="-1" role="menuitem">My Account</a></li>
    				    <li role="presentation"><a href="<?php echo url('update_ideal_profile') ?>" tabindex="-1" role="menuitem">Update ideal profile</a></li>

    				</ul>
    			    </li>
    			    <li class="active"><a href="<?php echo url('site/logout') ?>">Logout</a></li>

    			</ul>
    		    </div><!--right-hea-->
		    <?php } ?>
		</div><!--container-->
	    </div><!--header-->

	    <?php echo $content; ?>
	    <?php include ('footer.php') ?>

	</div><!--main-->

    </body>
</html>